﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>填写注册信息</title>
	
	<link href="css/index.css" rel="stylesheet" type="text/css" />
	<link href="css/register.css" rel="stylesheet" type="text/css" />
</head>
  
<body>
	<%@include file="public/head.jsp" %>	
		<div id="hr-body">
			<div class="hr-body-content">
				
				<table class="hr-body-layout" width="100%">
					<tbody>
						<tr>
							<%@include file="public/left.jsp" %>
							<td class="hr-bl-right" style="padding-left: 0pt;" valign="top">
								<table>
									<tbody>
										<tr>
											<td class="hr-bl-right" valign="top">
												<div class="RegisterWrap" style="text-align: center;">
													<h2>关于注册成为本商店用户的特别提示：</h2>
													<div class="reginfo">
														<ul>
															<li>本商店仅仅需要能送货的必要信息：收货人姓名、地址、邮政编码和联系电话。对于像性别、身份证号码等对于送货没有任何帮助的信息，我们都不会要求您填写。</li>
															<li>本商店将最大限度保护您的隐私。</li>
															<li>当然您不购买商品也可以成为本站用户，请填写下面的信息注册。</li>
															<li>如果您要将订购的商品寄给朋友，也请填写您自己的资料，您仅需在收银台处填写您朋友资料。</li>
														</ul>
													</div>
													<form name="FORM_TPL_REGISTER2" action="reguser" method="post" onSubmit="return Form_Validator(this)" autocomplete="off">
														<div class="loginform">
															<label>用户名：</label>
															<input type="text" name="username" class="inputstyle" />
															<span class="p9orange">*</span> 请使用英文和数字或Email,建议您用email作用户名,以减少重复几率<br />
															<label>密码：</label>
															<input type="password" name="passwd" class="inputstyle" />
															<span class="p9orange">*</span>不少于四个字符，不多于二十个字符<br />
															<label>重复密码：</label>
															<input type="password" name="repasswd" class="inputstyle" />
															<span class="p9orange">*</span> 两次密码必须相同<br />
															<label>电话号码：</label>
															<input type="text" name="phone" class="inputstyle" /><br />
															<label>地址：</label>
															<input type="text" name="addr" class="inputstyle" />
															<span class="p9orange">*</span>常用地址<br />
															<label></label>
															<br />
															<label>&nbsp;</label>
															<input name="Submit" type="submit" class="buttonstyle" value="确认" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
															&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="Submit" type="reset" class="buttonstyle" value="重置" />
															<br />
														</div>
													</form>
												</div>
												
												<script type="text/javascript"> 
													<!--  
													//提交表单输入有效性检测 
													function Form_Validator(theForm) 
													{
														//姓名检测
														if (theForm.username){
															if (theForm.username.value == ""){
																alert("请输入用户名！");
																theForm.username.focus();
																return (false);
															}
															var res = new RegExp("^([A-Za-z0-9][A-Za-z0-9_|\-|@|\.]+)+$","ig");
															if (!res.test(theForm.username.value))
															{
																theForm.username.focus();
																alert("用户名中含有非法字符！");
																return (false);
															}
														}

														//密码检测
														if (theForm.passwd){
															if (theForm.passwd.value == ""){
																alert("请输入密码！");
																theForm.passwd.focus();
																return (false);
															}
															var pswstr = theForm.passwd.value;
															if (pswstr.length < 4){
																alert("密码不能少于4位！");
																theForm.passwd.focus();
																return (false);
															}
															if (pswstr.length > 20){
																alert("密码不能多于20位！");
																theForm.passwd.focus();
																return (false);
															}
																
																
															if (theForm.passwd.value != theForm.repasswd.value){
																alert("两次输入密码不一致！");
																theForm.passwd.focus();
																return (false);
															}
														}
															
														
														}
														// -->
												</script>
											</td>
										</tr>
									</tbody>
								</table>
							</td>
				</tr>
			</tbody>
			</table>
			<%@include file="public/bottom.jsp" %>
		</div>
	</div>
		<%@include file="public/foot.jsp" %>
  </body>
</html>
